﻿using System.Collections;
using System.Collections.Generic;
using shaco.Base;
using UnityEngine;

namespace ShootMan.NetEvent
{
    public interface INetEvent
    {
        GameDefines.NetMesssageID messageID { get; }

        /// <summary>
        /// 将网络数据转换为二进制数据
        /// </summary>
        void WriteBody(shaco.Base.DataBuffer data);

        /// <summary>
        /// 从二进制数据中获取网络数据
        /// </summary>
        void ReadBody(shaco.Base.DataBuffer data);
    }

    //客户端发送到服务器消息
    public interface C2S_INetEvent : INetEvent
    {
        
    }

    //服务器发送到客户端消息
    public interface S2C_INetEvent : INetEvent
    {

    }

    //标记为全服务器推送事件的接口
    public interface S2C_INotifyEventType : INetEvent
    {
        void WriteNotifyData(INetEvent data);
    }
}